package com.lagou.module2.task2;

public class PayInfo extends CallPlan{
    //构造方法
    public PayInfo(){}

    //成员变量
    private int total_min;
    private int total_data;
    private double total_fee;

    //get，set方法
    public int getTotal_min() {
        return total_min;
    }

    public void setTotal_min(CallPlan call) {
        this.total_min = call.getMinutes();
    }

    public int getTotal_data() {
        return total_data;
    }

    public void setTotal_data(DataPlan data) {
        this.total_data = data.getData();
    }

    public double getTotal_fee() {
        return total_fee;
    }

    public void setTotal_fee(CallPlan call, DataPlan data) {
        this.total_fee = data.getData_fee()+call.getMonth_fee();
    }
    //成员方法
    public void getInfo(){
        System.out.println("本卡的总流量为：" + getTotal_data() + " 本卡的总通话时间" + getTotal_min() + " 本卡的总话费为" + getTotal_fee());
    }
}
